package com.junlaninfo;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * Created by 辉 on 2020/9/10.
 */
public class Test1 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask<String> task = new FutureTask<String>(new TestCallable());
        Thread thread = new Thread(task);
        thread.start();
        String s = task.get();
        System.out.println(s);

    }
}
